package com.wing.order.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.wing.order.model.entity.InventoryJobLabel;
import com.wing.order.model.response.InventoryJobLabelVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 出/入库作业产品明细-Dao
 *
 * @author
 */
@Mapper
public interface InventoryJobLabelDao extends BaseMapper<InventoryJobLabel> {

    /**
     * 列表-app
     *
     * @param params
     *
     * @return
     */
    List<InventoryJobLabelVO> list4app(@Param("params") Map<String, Object> params);

    /**
     * 分页列表-app
     *
     * @param page
     * @param params
     *
     * @return
     */
    List<InventoryJobLabelVO> list4app(@Param("page") Page<InventoryJobLabelVO> page, @Param("params") Map<String, Object> params);

    /**
     * 详情-app
     *
     * @param id
     *
     * @return
     */
    InventoryJobLabelVO get4appById(Long id);

    /**
     * 查询出库作业记录产品明细的包装码数据
     * @param jobId
     * @return
     */
    List<InventoryJobLabelVO> getOutWorkPackList(@Param("jobId") Long jobId,@Param("jobProductId") Long jobProductId);


    List<InventoryJobLabelVO> getLabelByDeliveryDetailIdBoxId(@Param("deliveryDetailId") Long deliveryDetailId,@Param("boxId") Long boxId);


    /**
     * 查询入库计划签收的产品信息
     */
    List<InventoryJobLabelVO> getInventorySignProduct(@Param("planId") Long planId);
    /**
     * 查询入库签收产品的包装条码
     * @param jobProductId
     * @return
     */
    List<InventoryJobLabelVO> getInventorySignPackLabel(@Param("jobProductId") Long jobProductId);

    /**
     * 入库作业/扫描包装条码
     * @param signId
     * @param code
     * @param inoutType
     * @return
     */
    InventoryJobLabelVO getSignPackLabel(@Param("signId") Long signId,@Param("code") String code
            ,@Param("inoutType") Integer inoutType,@Param("signProductDetailId") Long signProductDetailId);

    /**
     * 查询入作业已入库包装条码
     * @param jobId
     * @return
     */
    List<InventoryJobLabelVO> getStoragePackLabel(@Param("jobId") Long jobId);

    /**
     * 查询签收单产品信息和签收的条码总数
     * @param signProductDetailId
     * @return
     */
    InventoryJobLabelVO getSignPackLabelNum(@Param("signProductDetailId") Long signProductDetailId);

}
